<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="Mosaddek">
    <meta name="keyword" content="FlatLab, Dashboard, Bootstrap, Admin, Template, Theme, Responsive, Fluid, Retina">
    <link rel="shortcut icon" href="/img/favicon.html">

    <title>小时光科技 - 电销CRM</title>

    <!-- Bootstrap core CSS -->
    <link href="/css/bootstrap.min.css" rel="stylesheet">
    <link href="/css/bootstrap-reset.css" rel="stylesheet">
    <!--external css-->
    <link href="/assets/font-awesome/css/font-awesome.css" rel="stylesheet"/>
    <!-- Custom styles for this template -->
    <link href="/css/style.css" rel="stylesheet">
    <link href="/css/style-responsive.css" rel="stylesheet"/>

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 tooltipss and media queries -->
    <!--[if lt IE 9]>
    <script src="/js/html5shiv.js"></script>
    <script src="/js/respond.min.js"></script>
    <![endif]-->

    <script src="/layui/layui.js"></script>
    <script src="/js/global.js"></script>
    <script src="/js/jquery-1.8.3.min.js"></script>
</head>

<body class="login-body">

<div class="container">

    <form class=" layui-form form-signin" action="">
        <h2 class="form-signin-heading">超级管理员 - 注册</h2>
        <div class="login-wrap">
            <input name="Name" type="text" class="form-control" required lay-verify="required" placeholder="账号"autofocus>
            <input name="Nick" type="text" class="form-control" required lay-verify="required" placeholder="名称">
            <input name="Password" type="password" class="form-control" required lay-verify="required" placeholder="密码">
            <input name="WeChat" type="text" class="form-control" placeholder="微信">
            <input name="QQ" type="text" class="form-control" placeholder="QQ">
            <input name="Phone" type="text" class="form-control" placeholder="电话号码">
            <input name="Email" type="text" class="form-control" placeholder="Email">

            <button class="btn btn-lg btn-login btn-block" type="submit" lay-submit lay-filter="formRegist">注 册</button>
        </div>
    </form>
</div>
<script>
    layui.use('form',function () {
        var form = layui.form;
        //監聽提交
        form.on('submit(formRegist)',function (data) {
            var fields = data.field;
            global.post('/index.php/superadmin/index/mb_Regist',fields,function (msg) {
                if(msg['code'] == ErrCode_Normal){
                    layer.msg('注册成功', {
                        offset: '15px'
                        ,icon: 1
                        ,time: 1000
                    }, function(){

                    });
                    return false;
                } else {
                    mb_OnMessage(msg);
                    return false;
                }
            });
            return  false;
        });
    });
</script>
</body>
</html>
